-- GENERATED SPELL FOR [King Mosh] --


function spell0_6584(pUnit, Event) --@Recklessness,Self--
pUnit:FullCastSpellOnTarget(13847,pUnit)
pUnit:RegisterEvent('Sorts_6584', 15266, 1)
end

function spell1_6584(pUnit, Event) --@Terrifying Roar,Self--
pUnit:FullCastSpellOnTarget(14100,pUnit)
pUnit:RegisterEvent('Sorts_6584', 5331, 1)
end

function spell2_6584(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(15550,pUnit)
pUnit:RegisterEvent('Sorts_6584', 539, 1)
end

function spell3_6584(pUnit, Event) --@Vicious Rend,n/a--
pUnit:FullCastSpellOnTarget(14331,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6584', 15000, 1)
end

function Sorts_6584(pUnit, Event)
local choix_sorts_6584 = math.random(0, 3)
if choix_sorts_6584 == 0 then
pUnit:RegisterEvent('spell0_6584', 1, 1)
end
if choix_sorts_6584 == 1 then
pUnit:RegisterEvent('spell1_6584', 1, 1)
end
if choix_sorts_6584 == 2 then
pUnit:RegisterEvent('spell2_6584', 1, 1)
end
if choix_sorts_6584 == 3 then
pUnit:RegisterEvent('spell3_6584', 1, 1)
end
end

function mob6584_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6584', math.random(1500, 3000), 1)
end

function mob6584_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6584_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6584_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6584, 1, 'mob6584_Action')
RegisterUnitEvent(6584, 2, 'mob6584_Leave')
RegisterUnitEvent(6584, 3, 'mob6584_Kill')
RegisterUnitEvent(6584, 4, 'mob6584_Die')
